package com.meixiang.entity.shopping.result;

import android.os.Parcel;
import android.os.Parcelable;

import com.meixiang.entity.shopping.CartGoodsEntity;
import com.meixiang.entity.shopping.TransportEntity;

import java.util.List;

/**
 * 购物车生成订单Result
 */
public class BalanceAccountResult implements Parcelable {

    private String addressId; // 地址id
    private String trueName; // 姓名
    private String mobPhone; // 电话号码
    private String areaInfo; // 地区信息
    private String address; // 详情地址
    private String totalPrice; // 总价格
    private String goodsPrice; // 商品价格
    private String goodsTotalCount; // 商品总数
    private String storeId; // 店铺编号
    private String storeName; // 店铺名称
    private String couponId; // 优惠卷id
    private String couponTitle; // 优惠券标题（优惠券,满5000减500）
    private String couponPrice; // 优惠券价格
    private String couponInfo; // 优惠信息
    private String isPayPoint; // 可用积分
    private String pointBalance; // 金额
    private String pointText; // 积分显示文本
    private List<TransportEntity> transport; // 配送方式
    private List<CartGoodsEntity> cartGoodsList; // 商品列表

    public BalanceAccountResult() {
    }

    public BalanceAccountResult(String addressId, String trueName, String mobPhone, String areaInfo, String address, String totalPrice, String goodsPrice, String goodsTotalCount, String storeId, String storeName, String couponId, String couponTitle, String couponPrice, String couponInfo, String isPayPoint, String pointBalance, String pointText, List<TransportEntity> transport, List<CartGoodsEntity> cartGoodsList) {
        this.addressId = addressId;
        this.trueName = trueName;
        this.mobPhone = mobPhone;
        this.areaInfo = areaInfo;
        this.address = address;
        this.totalPrice = totalPrice;
        this.goodsPrice = goodsPrice;
        this.goodsTotalCount = goodsTotalCount;
        this.storeId = storeId;
        this.storeName = storeName;
        this.couponId = couponId;
        this.couponTitle = couponTitle;
        this.couponPrice = couponPrice;
        this.couponInfo = couponInfo;
        this.isPayPoint = isPayPoint;
        this.pointBalance = pointBalance;
        this.pointText = pointText;
        this.transport = transport;
        this.cartGoodsList = cartGoodsList;
    }

    public String getAddressId() {
        return addressId == null ? "" : addressId;
    }

    public void setAddressId(String addressId) {
        this.addressId = addressId;
    }

    public String getTrueName() {
        return trueName == null ? "" : trueName;
    }

    public void setTrueName(String trueName) {
        this.trueName = trueName;
    }

    public String getMobPhone() {
        return mobPhone == null ? "" : mobPhone;
    }

    public void setMobPhone(String mobPhone) {
        this.mobPhone = mobPhone;
    }

    public String getAreaInfo() {
        return areaInfo == null ? "" : areaInfo;
    }

    public void setAreaInfo(String areaInfo) {
        this.areaInfo = areaInfo;
    }

    public String getAddress() {
        return address == null ? "" : address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getTotalPrice() {
        return totalPrice == null ? "" : totalPrice;
    }

    public void setTotalPrice(String totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getGoodsTotalCount() {
        return goodsTotalCount == null ? "" : goodsTotalCount;
    }

    public void setGoodsTotalCount(String goodsTotalCount) {
        this.goodsTotalCount = goodsTotalCount;
    }

    public String getStoreId() {
        return storeId == null ? "" : storeId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }

    public String getStoreName() {
        return storeName == null ? "" : storeName;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    public String getCouponId() {
        return couponId == null ? "" : couponId;
    }

    public void setCouponId(String couponId) {
        this.couponId = couponId;
    }

    public String getCouponTitle() {
        return couponTitle == null ? "" : couponTitle;
    }

    public void setCouponTitle(String couponTitle) {
        this.couponTitle = couponTitle;
    }

    public String getCouponPrice() {
        return couponPrice == null ? "" : couponPrice;
    }

    public void setCouponPrice(String couponPrice) {
        this.couponPrice = couponPrice;
    }

    public String getCouponInfo() {
        return couponInfo == null ? "" : couponInfo;
    }

    public void setCouponInfo(String couponInfo) {
        this.couponInfo = couponInfo;
    }

    public String getIsPayPoint() {
        return isPayPoint == null ? "" : isPayPoint;
    }

    public void setIsPayPoint(String isPayPoint) {
        this.isPayPoint = isPayPoint;
    }

    public String getPointBalance() {
        return pointBalance == null ? "" : pointBalance;
    }

    public void setPointBalance(String pointBalance) {
        this.pointBalance = pointBalance;
    }

    public String getPointText() {
        return pointText == null ? "" : pointText;
    }

    public void setPointText(String pointText) {
        this.pointText = pointText;
    }

    public List<TransportEntity> getTransport() {
        return transport;
    }

    public void setTransport(List<TransportEntity> transport) {
        this.transport = transport;
    }

    public List<CartGoodsEntity> getCartGoodsList() {
        return cartGoodsList;
    }

    public void setCartGoodsList(List<CartGoodsEntity> cartGoodsList) {
        this.cartGoodsList = cartGoodsList;
    }

    public String getGoodsPrice() {
        return goodsPrice == null ? "" : goodsPrice;
    }

    public void setGoodsPrice(String goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.addressId);
        dest.writeString(this.trueName);
        dest.writeString(this.mobPhone);
        dest.writeString(this.areaInfo);
        dest.writeString(this.address);
        dest.writeString(this.totalPrice);
        dest.writeString(this.goodsPrice);
        dest.writeString(this.goodsTotalCount);
        dest.writeString(this.storeId);
        dest.writeString(this.storeName);
        dest.writeString(this.couponId);
        dest.writeString(this.couponTitle);
        dest.writeString(this.couponPrice);
        dest.writeString(this.couponInfo);
        dest.writeString(this.isPayPoint);
        dest.writeString(this.pointBalance);
        dest.writeString(this.pointText);
        dest.writeTypedList(this.transport);
        dest.writeTypedList(this.cartGoodsList);
    }

    protected BalanceAccountResult(Parcel in) {
        this.addressId = in.readString();
        this.trueName = in.readString();
        this.mobPhone = in.readString();
        this.areaInfo = in.readString();
        this.address = in.readString();
        this.totalPrice = in.readString();
        this.goodsPrice = in.readString();
        this.goodsTotalCount = in.readString();
        this.storeId = in.readString();
        this.storeName = in.readString();
        this.couponId = in.readString();
        this.couponTitle = in.readString();
        this.couponPrice = in.readString();
        this.couponInfo = in.readString();
        this.isPayPoint = in.readString();
        this.pointBalance = in.readString();
        this.pointText = in.readString();
        this.transport = in.createTypedArrayList(TransportEntity.CREATOR);
        this.cartGoodsList = in.createTypedArrayList(CartGoodsEntity.CREATOR);
    }

    public static final Creator<BalanceAccountResult> CREATOR = new Creator<BalanceAccountResult>() {
        @Override
        public BalanceAccountResult createFromParcel(Parcel source) {
            return new BalanceAccountResult(source);
        }

        @Override
        public BalanceAccountResult[] newArray(int size) {
            return new BalanceAccountResult[size];
        }
    };
}
